package com.xius.handler;

import com.xius.common.CodeObj;

/**
 * @ClassName TransException
 * @Description TODO 事务发生时的异常
 * @Author 谭庆伟
 * @Date 2020/6/5 14:20
 * @Version 1.0
 **/
public class TransException extends Exception{
    private String message;
    private CodeObj codeObj;
    public String getMessage() {
        return message;
    }
    public TransException(CodeObj codeObj) {
        this.codeObj = codeObj;
    }
    public CodeObj getCodeObj() {
        CodeObj codeObj = this.codeObj;
        String msg = codeObj.getMsg();
        codeObj.setMsg(msg+" (事务发生异常,数据回滚中。。。)");
        return codeObj;
    }
}
